from django.db import models

# Create your models here.
# 轮播图表
class AxfWheel(models.Model):
    img = models.CharField(max_length=128)
    name = models.CharField(max_length=64)
    trackid = models.ImageField()

    class Meta:
        db_table = 'axf_wheel'


# INSERT INTO axf_nav (id, img, name, trackid)
class AxfNav(models.Model):
    img = models.CharField(max_length=128)
    name = models.CharField(max_length=64)
    trackid = models.IntegerField()

    class Meta:
        db_table = 'axf_nav'


# INSERT INTO axf_mustbuy (id, img, name, trackid)
class AxfMustBuy(models.Model):
    img = models.CharField(max_length=128)
    name = models.CharField(max_length=64)
    trackid = models.IntegerField()

    class Meta:
        db_table = 'axf_mustbuy'


# INSERT INTO axf_mainshow (id, img, name, trackid, categoryid, brandname, img1, childcid1, productid1,
#                           longname1, price1, marketprice1, img2, childcid2, productid2, longname2,
#                           price2, marketprice2, img3, childcid3, productid3, longname3, price3, marketprice3)
class AxfMainShow(models.Model):
    img = models.CharField(max_length=128)
    name = models.CharField(max_length=64)
    trackid = models.IntegerField()
    categoryid = models.IntegerField()
    brandname = models.CharField(max_length=64)

    img1 = models.CharField(max_length=128)
    childcid1 = models.IntegerField()
    productid1 = models.IntegerField()
    longname1 = models.CharField(max_length=128)
    price1 = models.FileField()
    marketprice1 = models.FileField()

    img2 = models.CharField(max_length=128)
    childcid2 = models.IntegerField()
    productid2 = models.IntegerField()
    longname2 = models.CharField(max_length=128)
    price2 = models.FileField()
    marketprice2 = models.FileField()

    img3 = models.CharField(max_length=128)
    childcid3 = models.IntegerField()
    productid3 = models.IntegerField()
    longname3 = models.CharField(max_length=128)
    price3 = models.FileField()
    marketprice3 = models.FileField()

    class Meta:
        db_table = 'axf_mainshow'


